#include <54func.h>
int main()
{
    //getpgid(0):查询当前pid进程的组号
    if(fork())
    {
        printf("I am parent!pid = %d,pgid = %d,pgid of ppid = %d\n",
                        getpid(),getpgid(0),getpgid(getppid()));
    }else{
        printf("I am child!pid = %d,pgid = %d,pgid of ppid = %d\n",
                        getpid(),getpgid(0),getpgid(getppid()));
    }
    return 0;
}
